<template>
	<view class="container p_12">
		<view class="plr_12 bc_fff br_8 mb_8" v-for="item,index in dataList" :key="index" @click="handleDetail(item)">
			<view class="fx aic jcb ptb_12 bob_1 boc_grey">
				<view>
					{{item.applyTime||''}}
				</view>
				<view class="fc_primary">
					{{item.dealStatus==2?'已处理':'待处理'}}
				</view>
			</view>
			<view class="pt_12 pb_16 flow_h">
				<GoodsCard type="card" :data="item" :toDetail="false" />
			</view>
		</view>
		<view class="pt_16" v-if="dataList.length">
			<u-loadmore :status="loadingStatus" />
		</view>
	</view>
</template>

<script>
	import GoodsCard from '@/components/goods/GoodsCard.vue'
	import dataMixin from '@/mixins/data.js'
	export default {
		mixins: [dataMixin],
		components: {
			GoodsCard
		},
		data() {
			return {
				dataList: [],
				params: {
					origin: 1,
					userId: this.$store.state.userInfo.customerId
				},
				listUrl: '/order/api/orderAfterSale/page',
				showType:"",
				managerId:""
			}
		},
		onLoad(options) {
			if (options&&options.origin) {
				this.params.origin = options.origin
			}else{
				this.params.origin = 1
				this.$delete(this.params,'userId')
			}
			this.showType = options.showType||''
			this.managerId = options.managerId||''
		},
		onShow() {
			this.getData(true)
		},
		methods: {
			handleDetail(item) {
				uni.navigateTo({
					url: '/pages/person/pages/aftersale_detail?id=' + item.id
				})
			}
		},
	}
</script>

<style lang="scss">
	.container {}
</style>